import request from '@/api/request'

export function productsByPage(start = 1, limit = 10, data) {
  return request({
    url: `/lejuAdmin/product/productsByPage/${start}/${limit}`,
    method: 'POST',
    data
  })
}

// 是否更新
export function switchNewStatus(data) {
  return request({
    url: `/lejuAdmin/product/switchNewStatus`,
    method: 'POST',
    data
  })
}

// 是否推荐
export function switchRecommandStatus(data) {
  return request({
    url: `/lejuAdmin/product/switchRecommandStatus`,
    method: 'POST',
    data
  })
}

// 是否发布
export function switchPublishStatus(data) {
  return request({
    url: `/lejuAdmin/product/switchPublishStatus`,
    method: 'POST',
    data
  })
}

// 是否审核
export function switchVerifyStatus(data) {
  return request({
    url: `/lejuAdmin/product/switchVerifyStatus`,
    method: 'POST',
    data
  })
}

// 品牌列表
export function findAllBrand() {
  return request({
    url: `/lejuAdmin/brand/findAllBrand`,
    method: 'GET'
  })
}

export function del(id) {
  return request({
    url: `/lejuAdmin/product/del/${id}`,
    method: 'DELETE'
  })
}
